home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 90 / CDMM_90_1.ISO / Cycling Manager 2 / CyclingManager2Demo.exe / Disk1 / data1.cab / Game / DataCommon / ScriptsLibrary / SoundLibrary.cnh < prev    next >
Encoding:
Text File  |  2002-05-10  |  3.5 KB  |  62 lines

  1. class Sound_MultiAPI_Pointer;
  2.  
  3.  
  4. // This is the only function that permits to create a sound buffer. It permits you to create a sound by loading the contents of the file whose name is szFileName. returns zero if anything went wrong, any other value otherwise. Notice the you can cast Snd_Buffer variable to an i32x but that you will not be able to affect one to it.
  5. func i32x LoadSound(szx szfileName, i32x iLineIndex, i32x iValue, i32x iCtrl3D);
  6.  
  7. // destroys a sound buffer. returns zero if anything went wrong, any other value otherwise.
  8. func void DestroySound(i32x iLineIndex, i32x iBufferIndex);
  9. // takes a loaded sound buffer and creates a copy of it so that both can be played at the same time with diferent freq/Volume/pan.
  10. func i32x CopySound(i32x iLineIndex, i32x iBufferIndex);
  11.  
  12. // plays a sound buffer once. returns zero if anything went wrong, any other value otherwise.
  13. func void PlaySound(i32x iLineIndex, i32x iBufferIndex);
  14. func void Play3DSound(i32x iLineIndex, i32x iBufferIndex);
  15.  
  16. // plays a sound buffer in an infinite loop. returns zero if anything went wrong, any other value otherwise.
  17. func void PlaySoundLoop(i32x iLineIndex, i32x iBufferIndex);
  18. func void Play3DSoundLoop(i32x iLineIndex, i32x iBufferIndex);
  19.  
  20. // pan / position
  21. func void Set3DSoundPosition(i32x _iSourceIndex, f32x _fX, f32x _fY, f32x _fZ);
  22.  
  23. // stops a sound buffer's playback. returns zero if anything went wrong, any other value otherwise.
  24. func void StopSound(i32x iLineIndex, i32x iBufferIndex);
  25.  
  26. // sets the Volume of a sound buffer. The iVolume value can be -10000 for nosound, 0 for maximum Volume, and anything in between these two values. returns zero if anything went wrong, any other value otherwise.
  27. func void SetVolume(i32x iLineIndex, i32x iBufferIndex, f32x _fValue);
  28. // gets the Volume of a sound buffer. The return value can be -10000 for nosound, 0 for maximum Volume, and anything in between these two values.
  29. func f32x GetVolume(i32x iLineIndex, i32x iBufferIndex);
  30.  
  31. // sets the panoramic (left/right) of a sound buffer. The iPan value can be -10000 for left, 10000 for right, and anything in between these two values, 0 being the center. returns zero if anything went wrong, any other value otherwise.
  32. func void SetPan(i32x iLineIndex, i32x iBufferIndex, f32x _fValue);
  33. // gets the panoramic (left/right) of a sound buffer. The return value can be -10000 for left, 10000 for right, and anything in between these two values, 0 being the center. 
  34. func f32x GetPan(i32x iLineIndex, i32x iBufferIndex);
  35.  
  36. // sets the frequency of a sound buffer. The iFrequency value can be in between 100Hz and 100000Hz. returns zero if anything went wrong, any other value otherwise.
  37. func void SetFrequency(i32x iLineIndex, i32x iBufferIndex, f32x _fValue);
  38. // gets the frequency of a sound buffer. The return value can be in between 100Hz and 100 000Hz.   
  39. func f32x GetFrequency(i32x iLineIndex, i32x iBufferIndex);
  40.  
  41.  
  42. // add mp3 file to playlist
  43. func void AddMp3(szx szfileName);
  44. // switch to next mp3 file
  45. func void NextMp3();
  46. // return true if current Mp3 are end
  47. func i32x IsMp3Ended();
  48. // start running mp3 playback
  49. func void PlayMp3();
  50. // stop playback
  51. func void StopMp3();
  52. // set Mp3 volume playback
  53. func void SetMp3Volume(f32x _fVolume);
  54. // return mp3 volume playback
  55. func f32x GetMp3Volume();
  56. // return mp3 file name
  57. func szx GetMp3FileName(i32x _iIndex);
  58. // return number of loaded mp3s
  59. func i32x GetNumLoadedMp3();
  60. // return current mp3 index
  61. func i32x GetCurrentMp3Index();
  62.